home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Games #12
/
GEGA012.iso
/
Jogos de Azar
/
flash_poker.swf
/
scripts
/
frame_20
/
DoAction.as
Wrap
Text File
|
2006-01-17
|
1KB
|
70 lines
Flush = "0";
Straight = "0";
HStraight = "0";
WinStatus = "0";
ii = "1";
while(ii < "14")
{
kk = "1";
while(kk < "5")
{
X = "1";
while(X < "6")
{
if(eval("Hand" add X) == "53")
{
set("CValue" add X,ii);
set("CSuit" add X,kk);
}
else
{
CardValue = eval("Hand" add X);
call("GetSuitCard");
set("CValue" add X,Card);
set("CSuit" add X,Suit);
}
X += "1";
}
call("SortValues");
if(!Flush)
{
Flush = CSuit1 == CSuit2 and CSuit2 == CSuit3 and CSuit3 == CSuit4 and CSuit4 == CSuit5;
}
if(!Straight)
{
Straight = CValue1 + "1" == CValue2 and CValue2 + "1" == CValue3 and CValue3 + "1" == CValue4 and CValue4 + "1" == CValue5;
}
if(!HStraight)
{
HStraight = CValue1 == "1" and CValue2 == "10" and CValue3 == "11" and CValue4 == "12" and CValue5 == "13";
}
call("IsKind");
T = IsKind;
if(WinStatus < T)
{
WinStatus = T;
}
kk += "1";
}
ii += "1";
}
if(WinStatus < "3")
{
if(HStraight and Flush)
{
WinStatus = "9";
}
else if(Straight and Flush)
{
WinStatus = "7";
}
else if(HStraight or Straight)
{
WinStatus = "4";
}
else if(Flush)
{
WinStatus = "3";
}
}